import React from 'react';
import SingleObserver from './SingleObserver'

interface SizeInfo  {

}

export type OnResize = (sizeInfo:SizeInfo)=>void

export interface ScaleContainerProps {
  width:number; //设计稿
  height:number; //设计搞
  children:React.ReactElement  //子元素
  disabled?:boolean;//是否监听(执行缩放逻辑)
  maxScale?:number;  //最大缩放比例
  minScale?:number;//最小缩放比例
  onResize?:OnResize // 回调
  
}

function ScaleContainer(props:ScaleContainerProps) {
  const {children } = props
  return (
      <SingleObserver {...props}>
      {children}
      </SingleObserver>
  );
}

export default ScaleContainer;
